<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div onclick="testRGB(0)">testRGB</div>
  <div onclick="testALPHA(255)">testALPHA</div>
  <script>
    function testRGB(i) {
      if (i <= $('.es-rgb_range_bar').attr("max")) {
        $('.es-rgb_range_bar').val(i).trigger("input");
        i++;
        setTimeout(function () {
          testRGB(i);
        }, 200)
      } else return
    }

    function testALPHA(i) {
      // console.log(1111)
      if (i >= $('.alpha_range').attr("min")) {
        $('.alpha_range').val(i).trigger("input");
        i--;
        setTimeout(function () {
          testALPHA(i);
        }, 200)
      } else return
    }
  </script>
</body>

</html>